<template>
  <template v-if="isMounted">
    <slot />
  </template>
</template>

<script lang="ts">
import { ref, onMounted } from 'vue'

export default {
  name: 'ClientOnly',
  setup() {
    const isMounted = ref(false)

    onMounted(() => {
      isMounted.value = true
    })

    return {
      isMounted
    }
  }
}
</script>
